<template>
  <div>
    <div class="topic-box">
      <div class="img-box">
        <a href="javascript:;">
          <img :src="topicObj.imgUrl" alt="" />
        </a>
      </div>
      <div class="text-box">
        <h3>
          <a href="javascript:;">{{ topicObj.title }}</a>
        </h3>
        <p class="time">{{ topicObj.time }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    topicObj: {
      type: Object
    },
  },
  name: "Topiclist",
};
</script>

<style lang="scss" scoped>
.topic-box {
  width: 380px;
  height: 302px;
  background-color: #fff;
  margin-bottom: 20px;
  .img-box {
    a {
      display: block;
      width: 380px;
      height: 198px;
      img {
        width: 380px;
        height: 198px;
        &:hover {
          opacity: 0.9;
        }
      }
    }
  }
  .text-box {
    padding: 15px;
    h3 {
      height: 50px;
      a {
        color: #333;
        font-size: 18px;
      }
    }
    .time {
      color: #999;
      font-size: 12px;
      margin-top: 10px;
    }
  }
}
</style>